package com.swyc.osschat.Test.LambdaTest.Controller;

import java.util.function.Consumer;

import com.swyc.osschat.Test.LambdaTest.Bean.Student;

/**
 * @author zhaol@yunrong.cn
 * @version V2.1
 * @since 2.1.0 2019/8/9 11:31
 */
public class ConsumerTest {
    public static void main(String[] args) {
        Student student = new Student("9龙", 23, 175);
        Consumer<String> consumer = System.out::println;
        consumer.accept(Student.beanToString(student));

        Consumer<Student> studentConsumer = student1 -> modifyStudent(student1);
        studentConsumer.accept(student);
        System.out.println("ss");
    }

    public static Student modifyStudent(Student s){
        s.setStature(100);
        return s;
    }
}
